<?php
    /**
     * @class  popup
     * @author XESCHOOL Revised for use in v1.5 (xeschool@gmail.com) 
     * @brief  high class of the popup module
	 **/

    class popup extends ModuleObject {

        /**
         * @brief Implement if additional tasks are necessary when installing
         **/
        function moduleInstall() {

            return new Object();
        }

        /**
         * @brief a method to check if successfully installed
		 **/
        function checkUpdate() {

			$oModuleModel = &getModel('module');
			if(!$oModuleModel->isIDExists($this->module)) return true;

            return false;
        }

        /**
         * @brief Execute update
         **/
        function moduleUpdate() {

			$oModuleModel = &getModel('module');
			$oPopupAdminController = &getAdminController('popup');

			if(!$oModuleModel->isIDExists($this->module)) $oPopupAdminController->popupModuleRegister();

            return new Object(0, 'success_updated');
        }

        /**
         * @brief Re-generate the cache file
         **/
        function recompileCache() {
        }

    }
?>